import re,requests
import requests
req = requests.get("https://www.sanchuangedu.cn/")
ret = re.findall(r"(?<=<img src=\").*\w+\.jpg", req.text)
print(ret)
length = len(ret)
for imgurl in range(length):
    src = "https://www.sanchuangedu.cn/" + ret[imgurl]
    url = "D:\\IMG"+ str(imgurl+1)+".jpg"
    r = requests.get(src)
    with open(url,'wb') as f:
        f.write(r.content)
        print("下载了%d张"%imgurl)